<!DOCTYPE html>
<html>
<head>
    <title>存储过程管理</title>
<#import "/common/common.macro.ftl" as netCommon>
<@netCommon.commonStyle />
    <!-- DataTables -->
    <link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.css">
    <link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/selectPicker/bootstrap-select.min.css">

</head>
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && "off" == cookieMap["xxljob_adminlte_settings"].value >sidebar-collapse</#if> ">
<div class="wrapper">
    <!-- header -->
<@netCommon.commonHeader />
    <!-- left -->
<@netCommon.commonLeft "procedure" />

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>存储过程管理<small>任务调度中心</small></h1>
            <!--
<ol class="breadcrumb">
    <li><a><i class="fa fa-dashboard"></i>调度管理</a></li>
    <li class="active">调度中心</li>
</ol>
-->
        </section>

        <!-- Main content -->
        <section class="content">

            <div class="row">
                <div class="col-xs-3">
                    <div class="input-group">
                        <span class="input-group-addon">对象名称</span>
                        <input type="text" class="form-control" id="OBJECT_NAME" autocomplete="on" >
                    </div>
                </div>
                <div class="col-xs-3">
                    <div class="input-group">
                        <span class="input-group-addon">存储过程</span>
                        <input type="text" class="form-control" id="PROCEDURE_NAME"  name="PROCEDURE_NAME"  autocomplete="on" >
                    </div>
                </div>
                <div class="col-xs-3">
                    <div class="input-group">
                        <span class="input-group-addon">HIS标记</span>
                        <select type="text" class="form-control" id="IS_HISTORY"   >
                            <option value="">--全选--</option>
						<#list booleanFlag  as  flag>
                            <option value="${flag}">${flag}</option>
						</#list>
                        </select>
                    </div>
                </div>
                <div class="col-xs-1">
                    <button class="btn btn-block btn-info" id="searchBtn" lay-filter="prc-search">搜索</button>
                </div>
                <div class="col-xs-1">
                    <button class="btn btn-block btn-success add" type="button">新增任务</button>
                </div>
                <div class="col-xs-1">
                    <button class="btn btn-block btn-success rerun" type="button">重跑设定</button>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header hide">
                            <h3 class="box-title">调度列表</h3>
                        </div>
                        <div class="box-body" >
                            <table id="procedure_list" class="table table-bordered table-striped" width="100%" >
                                <thead>
                                <th>对象ID</th>
                                <th>对象名称</th>
                                <th>对象描述</th>
                                <th>存储过程名称</th>
                                <th>运行时间</th>
                                <th>His时间</th>
                                <th>操作</th>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- footer -->
<@netCommon.commonFooter />
</div>

<!-- job新增.模态框 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" >新增任务</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form" role="form" >
                    <input name="OBJECT_ID" type="hidden" value="">
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">对象名称<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="OBJECT_NAME" placeholder="请输对象名称" maxlength="150" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">对象描述<font color="red">*</font></label>
                        <div class="col-sm-4"><input type="text" class="form-control" name="OBJECT_DESC" placeholder="OBJECT_DESC" maxlength="150" ></div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">存储过程名称<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="PROCEDURE_NAME" placeholder="PROCEDURE_NAME" maxlength="128" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">是否有效<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="ACTIVE">
                                <option value="Y">Y</option>
                                <option value="N">N</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">数据间隔时间<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="INTERVAL" placeholder="请输入数字" maxlength="100" value="5">
                        </div>
                        <label for="firstname" class="col-sm-2 control-label">数据开始时间<font color="red">*</font></label>
                        <div class="col-sm-4"><input type="text" dateFlag="Y" class="form-control" name="START_TIME"  maxlength="100" ></div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">更新开始最大时间间隔<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="MAX_INTERVAL" placeholder="请输入数字" maxlength="100" value="5" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">是否重跑<font color="black">*</font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="ISRERUN" placeholder="是否重跑:Y,N" >
                                <option value="0">N</option>
                                <option value="1">Y</option>
                            </select>
                          </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">是否补His资料<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="IS_HISTORY" >
                                <option value="N">N</option>
                                <option value="Y">Y</option>
                            </select>
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">HIS执行标记<font color="red"></font></label>
                        <div class="col-sm-4">
                             <select class="form-control" name="HIS_RUN_FLAG" >
                                <option value="N">N</option>
                                <option value="Y">Y</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">是否运行中<font color="red"></font></label>
                        <div class="col-sm-4">
                             <select class="form-control" name="RUN_FLAG" >
                                <option value="Y">Y</option>
                                 <option value="N">N</option>
                            </select>
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">存储运行时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y"  name="RUNTIME"  maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">HIS的开始时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y" name="HIS_START_TIME"  maxlength="100" >
                        </div>
                        <label for="firstname" class="col-sm-2 control-label">HIS的结束时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y" name="HIS_END_TIME"  maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">HIS当前跑到时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y" name="HIS_RUN_TIME"  maxlength="100" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">时间比较字符串<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="MAX_PROCESS_DATE"  maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">最大等待时间间隔<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="WAIT_INTERVAL"  placeholder="请输入数字" maxlength="100" value="5">
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">最大执行次数<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="MAX_COUNT"  maxlength="100" value="2" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">级别<font color="red"> </font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="LEVEL_SEQ" >
                                <option value="1">一级</option>
                                <option value="2">二级</option>
                                <option value="3">三级</option>
                            </select>
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">同一时间内执行次数<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="CURRENT_COUNT"     maxlength="100" value="0" >
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">受影响行数<font color="red"> </font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="ROWCOUNT" readonly   maxlength="100" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">消耗时间<font color="red"> </font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="TIME_CONSUMING" readonly maxlength="100" >
                        </div>
                    </div>

                      <hr>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-6">
                            <button type="submit" class="btn btn-primary"  >保存</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 更新.模态框  -->

<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" >修改任务</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form" role="form" >
                    <input name="OBJECT_ID" type="hidden" value="">
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">对象名称<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="OBJECT_NAME" placeholder="请输对象名称" maxlength="150" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">对象描述<font color="red">*</font></label>
                        <div class="col-sm-4"><input type="text" class="form-control" name="OBJECT_DESC" placeholder="OBJECT_DESC" maxlength="150" ></div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">存储过程名称<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="PROCEDURE_NAME" placeholder="PROCEDURE_NAME" maxlength="128" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">是否有效<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="ACTIVE" >
                                <option value="Y">Y</option>
                                <option value="N">N</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">数据间隔时间<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="INTERVAL" placeholder="请输入数字" maxlength="100" value="5" >
                        </div>
                        <label for="firstname" class="col-sm-2 control-label">数据开始时间<font color="red">*</font></label>
                        <div class="col-sm-4"><input type="text" dateFlag="Y" class="form-control" name="START_TIME"  maxlength="100" ></div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">更新开始最大时间间隔<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="MAX_INTERVAL" placeholder="请输入数字" maxlength="100" value="5">
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">是否重跑<font color="black"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="ISRERUN" placeholder="是否重跑:Y,N" maxlength="100" readonly >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">是否补His资料<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="IS_HISTORY" >
                                <option value="N">N</option>
                                <option value="Y">Y</option>
                            </select>
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">HIS执行标记<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="HIS_RUN_FLAG" readonly  maxlength="100" >

                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">是否运行中<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y1" name="RUN_FLAG" readonly  maxlength="100" >

                        </div>
                        <label for="lastname" class="col-sm-2 control-label">存储运行时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" readonly name="RUNTIME"    maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">HIS的开始时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y" name="HIS_START_TIME"  maxlength="100" >
                        </div>
                        <label for="firstname" class="col-sm-2 control-label">HIS的结束时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y" name="HIS_END_TIME"  maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">HIS当前跑到时间<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" dateFlag="Y" name="HIS_RUN_TIME"  maxlength="100" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">时间比较字符串<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="MAX_PROCESS_DATE"  maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">最大等待时间间隔<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="WAIT_INTERVAL"  placeholder="请输入数字" maxlength="100" value="5">
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">最大执行次数<font color="red"></font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="MAX_COUNT"  readonly maxlength="100" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">级别<font color="red"> </font></label>
                        <div class="col-sm-4">
                            <select class="form-control" name="LEVEL_SEQ" >
                                <option value="1">一级</option>
                                <option value="2">二级</option>
                                <option value="3">三级</option>
                            </select>
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">同一时间内执行次数<font color="red">*</font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="CURRENT_COUNT"  maxlength="100"  readonly>
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="firstname" class="col-sm-2 control-label">受影响行数<font color="red"> </font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="ROWCOUNT" readonly   maxlength="100" >
                        </div>
                        <label for="lastname" class="col-sm-2 control-label">消耗时间<font color="red"> </font></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="TIME_CONSUMING" readonly  maxlength="100" >
                        </div>
                    </div>

                    <hr>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-6">
                            <button type="submit" class="btn btn-primary"  >保存</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!--重跑设定 -->

<div class="modal fade" id="reRunModal" tabindex="-1" role="dialog"  aria-hidden="true"  >
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" >重跑设定</h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <label for="firstname" class="col-sm-2 control-label">对象名称<font color="red">*</font></label>
                    <div class="col-sm-4">
                        <select   class="form-control selectpicker" name="TABLE_NAME"  id="TABLE_NAME" placeholder="输入选择"  data-live-search="true" data-actions-box="true" multiple  >

                        </select>
                    </div>
                    <label for="lastname" class="col-sm-2 control-label"><font color="red"></font></label>
                    <div class="col-sm-4">
                        <button class="btn btn-block btn-info" id="searchLogBtn" lay-filter="prc-search">搜索</button>
                    </div>
                </div>
                <hr>
                <div class="form-group">
                    <label for="firstname" class="col-sm-2 control-label">配置重跑时间<font color="red">*</font></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="reRunTime" id="reRunTime" placeholder="配置重跑时间" maxlength="150" >
                    </div>
                    <label for="lastname" class="col-sm-2 control-label">配置进程数<font color="red">*</font></label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="threadCount" id="threadCount" placeholder="配置进程数" maxlength="128" >
                    </div>
                </div>
                <hr>
                <div class="form-group">

                    <div class="col-sm-4">
                        <button type="button" class="btn btn-primary" id="all-reRun-bt"  >一键重跑</button>
                        <button type="button" class="btn btn-primary" id="reRun-bt" >执行重跑</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    </div>

                </div>

                    <hr>

                    <table id="rerun_log_list"   class="table table-bordered table-striped" width="100%" >
                        <thead>
                        <th>表名称</th>
                        <th>过程名称</th>
                        <th>级别</th>
                        <th>开始时间</th>
                        <th>结束时间</th>

                        </thead>

                    </table>

                    <hr>

            </div>
        </div>
    </div>
</div>


<@netCommon.commonScript />
<!-- DataTables -->
<script src="${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="${request.contextPath}/static/plugins/jquery/jquery.validate.min.js"></script>
<!-- moment -->
<script src="${request.contextPath}/static/adminlte/plugins/daterangepicker/moment.min.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/daterangepicker/daterangepicker.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/selectPicker/bootstrap-select.min.js"></script>

<script src="${request.contextPath}/static/js/procedure.1.js"></script>

</script>
</body>
</html>
